package com.ruoyi;

import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.annotation.MapperScans;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * 启动程序
 *
 * @author ruoyi
 */
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }, scanBasePackages = { "com.ruoyi",
        "com.mindmax" }) // 扫描com.mindmax.system包下的所有类

@MapperScans({@MapperScan("com.ruoyi.*.mapper"), @MapperScan("com.mindmax.*.mapper")})
public class ETrackerApplication {
    public static void main(String[] args) {
        // System.setProperty("spring.devtools.restart.enabled", "false");
        ConfigurableApplicationContext context = SpringApplication.run(ETrackerApplication.class, args);
        String[]                       activeProfiles = context.getEnvironment().getActiveProfiles();
        System.out.println();
        System.out.println("***********************************************************************");
        System.out.printf("***　Application is running in profile(s): %s%n", (Object[]) activeProfiles);
        System.out.println("***********************************************************************");
        System.out.println();
        System.out.println("┌─────────────────────────────────────────────┐\n" +
                "│  ,--.   ,--.        ,--.  ,--. ,--. ,--.   │\n" +
                "│ (   `.'   .')      /   `|  | |  | |  |   │\n" +
                "│  `--' ,---'       |--.  |  | |  | `--'   │\n" +
                "│     /  |          |  `--'  | `--' ,--.   │\n" +
                "│    `--'          `------' `----'`--'    │\n" +
                "└───────────────────────────────────────────┘\n" +
                " (ツ) E-Tracker 启动成功 (ツ)\n");
    }

}
